<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('待检测列表修改')"/>
	<link rel="stylesheet" th:href="@{/static/scaletab/scaletabedit.css}"/>
</head>
<body style="background-color: white;">
<form class="layui-form" action=""  th:object="${Detection}">
    <div class="mainBox">
        <div class="main-container">
			<div class="centered-div">
			<table  id="myTable"  style='border-collapse:	collapse;table-layout:fixed;width:766pt'>
				<col width=64 span=6 style='width:48pt'>

				<tr height=18  style='mso-height-source:userset;height:18.8pt'>
					<td colspan=5 height=18 class=xl6332418 style='height:13.8pt' th:text="'客户名称: ' + *{customer}"/>
					<td colspan=6 class=xl6432418  th:text="'型号规格／测量范围: ' + *{modelspecifications}"/>
					<td colspan=5 class=xl6432418   th:text="'任务单号: ' + *{taskno}"/>
				</tr>
				<tr height=18 class="tr_height" style='mso-height-source:userset;height:24.8pt'>
					<td colspan=5 height=18 class=xl6332418 style='height:13.8pt'   th:text="'制造厂／商: ' + *{manufacturer}"/>
					<td colspan=6 class=xl6432418  th:text="'准确度等级／MPE: ' + *{mpe1}">
					</td>
					<td colspan=5 class=xl6432418  th:text="'出厂编号: ' + *{exitnum}"/>
				</tr>
				<tr height=19 class="tr_height" style='mso-height-source:userset;height:24.8pt'>
					<td colspan=5 height=19 class=xl6332418 style='height:14.4pt'th:text="'主要标准器名称: ' + *{mainstandard}"/>
					<td colspan=3 class=xl6432418 th:text="'测量范围: ' + *{mrange}"/>
					<td colspan=5 class=xl6432418 th:text="'证书编号: ' + *{certificateno}"/>
				</tr>
				<tr height=19 class="tr_height" style='height:24.8pt'>
					<td colspan=6 height=19 class=xl6332418 style='height:14.4pt' th:text="'标准砝码: ' + *{smw}"/>
					<td colspan=8 class=xl6432418  th:text="'证书有效期至: ' + *{certificateutil}"/>
				</tr>
				<tr height=19 class="tr_height" style='height:24.8pt'>
					<td height=19 class=xl6332418 colspan=3 style='height:14.4pt'>
						检定的环境条件:
					</td>
					<td colspan=2 class=xl6432418 th:text="'温度: ' + *{temperature}+'℃'"/>
					<td colspan=2 class=xl6932418 th:text="'湿度: ' + *{humidity}+'%RH'"/>
					<td colspan=3 class=xl6432418 th:text="'大气压力: ' + *{atmospheric}+'hPa'"/>
					<td colspan=3 class=xl6932418  th:text="'空气密度: ' + *{airdensity}+'mg/cm³'"/>
					<td colspan=3 class=xl6432418 th:text="'材料: ' + *{stuff}"/>

				</tr>
				<tr height=19 class="tr_height" style='height:24.8pt'>
					<td colspan=7 height=19 class=xl6332418 style='height:14.4pt' th:text="'检定依据的技术文件: ' + *{according}"/>
					<td colspan=5 class=xl6432418 th:text="'计量标准使用前工作状况: ' + *{prework}"/>
					<td colspan=4 class=xl6432418 th:text="'计量标准使用后工作状况: ' + *{afterwork}"/>
				</tr>
				<tr height=19 class="tr_height" style='height:24.8pt'>
					<td colspan=11 height=19 class=xl6332418 style='height:14.4pt' th:text="'检定项目: ' + *{project}"/>
					<td colspan=6 class=xl6432418 th:text="'检定地点: ' + *{inspectionsite}"/>
				</tr>

				<!-- --------------------------------------------------------------------------------------------------------------------------- -->
				<tr name="tab_header_one" class="tab_header " height=18 style='mso-height-source:userset;height:13.2pt'>
					<td rowspan=2 height=57 class=xl6532418 width=64 style='height:42.6pt;
								width:48pt'>
						检定顺序
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						名义质量（kg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						秤盘
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						读数1（mg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						读数2（mg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						平衡位置
					</td>
					<td rowspan=2 class=xl6532418 width=61 style='width:46pt'>
						分度值（mg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						相差质量（mg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						标准砝码约定质量修正值（mg）
					</td>
					<td rowspan=2 class=xl6532418 width=64 style='width:48pt'>
						空气浮力修正（mg）
					</td>
					<td colspan=2 class=xl6532418 width=128 style='border-left:none;width:96pt'>
						约定质量（mg）
					</td>
					<td colspan=2 class=xl6532418 width=128 style='border-left:none;width:96pt'>
						磁化率
					</td>
					<td colspan=2 class=xl6532418 width=128 style='border-left:none;width:96pt'>
						极化强度（μΤ）
					</td>
				</tr>
				<tr name="tab_header_two"  class="tab_header " height=39 style='height:29.4pt'>
					<td height=39 class=xl6532418 width=64 style='height:29.4pt;border-top:none;
								border-left:none;width:48pt'>
						修正值
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						允差（±）
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						读数
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						允差（±）
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						读数
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						允差（±）
					</td>
				</tr>
				<tr name="tr_first" class="tr_abba" height=20 style='height:15.0pt'>

					<td rowspan=4 height=80 class=xl6532418 width=64 style='height:60.0pt;
								border-top:none;width:48pt'>
						1
					</td>
					<td id="tdsmw" rowspan=4 class=xl6532418 width=64 style='border-top:none;width:48pt'/>
						　

					<td class=xl6632418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						A
					</td>
					<td  id="read11"  class=xl6532418  width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td id="read21" class=xl6532418  width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						　
					</td>
					<!--分度值-->
					<td id="division" rowspan=4 class=xl6532418 width=61 style='border-top:none;width:46pt'>
						1
					</td>
					<!--相差质量-->
					<td rowspan=4 class=xl6532418 id="differMass" name="differMass"  width=64 style='border-top:none;width:48pt'>
					</td>
					<!--标准砝码约定质量修正值-->
					<td id="standardWeightCorrected" rowspan=4 class=xl6532418  width=64 style='border-top:none;width:48pt'>

					</td>
					<!-- 空气浮力修正值-->
					<td rowspan=4 class=xl6532418  id="airCorrected" name="airCorrected" width=64 style='border-top:none;width:48pt' contenteditable="true">
					</td>
					<td rowspan=4  id="massCorrected"  name="massCorrected" class=xl6532418 width=64 style='border-top:none;width:48pt' >
						<!-- 约定质量修正值-->
					</td>
					<td id="magneticTolerance" rowspan=4 class=xl6532418  width=64 style='border-top:none;width:48pt'>
					</td>
					<!-- 注释内容 约定值允差-->
					<td id="magneticReads" rowspan=4 class=xl6532418  width=64 style='border-top:none;width:48pt'  contenteditable="true" >
					</td>
					<td id="massTolerance"  rowspan=4 class=xl6532418 width=64 style='border-top:none;width:48pt'>
					</td>
					<td  id="polarizationReads" rowspan=4 class=xl6532418 width=64 style='border-top:none;width:48pt' contenteditable="true">
						<!-- 极化强度-->
					</td>
					<td id="polarizationTolerance" rowspan=4 class=xl6532418  width=64 style='border-top:none;width:48pt'>
					</td>
				</tr>
				<tr class="tr_abba" height=20 style='height:15.0pt'>
					<td height=20 class=xl6732418 width=64 style='height:15.0pt;border-top:none;
								border-left:none;width:48pt'>
						B
					</td>
					<td id="read12" class=xl6532418  width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td id="read22" class=xl6532418  width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>

					</td>
				</tr>
				<tr class="tr_abba" height=20 style='height:15.0pt'>
					<td height=20 class=xl6732418 width=64 style='height:15.0pt;border-top:none;
								border-left:none;width:48pt'>
						B
					</td>
					<td class=xl6532418 id="read13" width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 id="read23" width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						　
					</td>
				</tr>
				<tr class="tr_abba" height=20 style='height:15.0pt'>
					<td height=20 class=xl6732418 width=64 style='height:15.0pt;border-top:none;
								border-left:none;width:48pt'>
						A
					</td>
					<td class=xl6532418 id="read14" width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 id="read24" width=64 style='border-top:none;border-left:none;
								width:48pt'>
					</td>
					<td class=xl6532418 width=64 style='border-top:none;border-left:none;
								width:48pt'>
						　
					</td>
				</tr>

				<!-- --------------------------------------------------------------------------------------------------------------------------- -->
				<tr name="tr_cmd" class="tr_cmd " height=30 style='height:45pt;'>
					<td colspan=16 height=30 class=xl7032418 width=1021 style='height:45pt;text-align:left;width:766pt'>
						<div class="mb-3" id="scaleconsole">
							<span id="scaleconsolespan"></span>
							<p id="shanshuo">--</p>
						</div>
					</td>
				</tr>
				<script>
					window.addEventListener('DOMContentLoaded', function () {
						const consoleDiv = document.getElementById('scaleconsole');
						consoleDiv.scrollTop = consoleDiv.scrollHeight;
					});

					// 如果是动态加载内容的情况，每次添加新内容后也需要滚动到底部
					function appendToConsole(newContent) {
						const newLine = document.createElement('p');
						//newLine.textContent = newContent;
						const colors = [
							'#00FF00'
						];
						let words = newContent.split(' ');
						for(let i = 0; i < words.length; i++) {
							let span = document.createElement('span');

							span.textContent = words[i]+' ';
							// 随机生成颜色
							const index = Math.floor(Math.random() * colors.length);
							let color = colors[index];
							span.style.color = color;
							newLine.appendChild(span);
						}

						document.getElementById('scaleconsolespan').appendChild(newLine);
						document.getElementById('scaleconsole').scrollTop = document.getElementById('scaleconsole').scrollHeight;
					}

				</script>
				<tr height=19 style='height:14.4pt'>
					<td colspan=13 height=20 class=xl6332418 style='height:15.0pt'/>
					<td colspan=3 height=20 class=xl6332418 style='height:15.0pt'>
						　<div class="hidden">
							<input type="text"  th:value="*{smw}" id="smw" name="nominalMass"/>
							<input type="text" id="read2" name="read2" th:value="*{id}"  />
							<!-- 预制值 -->
							<select id="yzz" name="yzz"  th:with="type=${@dict.getType('json')}">
								<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
							</select>
							<input type="text" id="read1" name="read1"   />
						<input type="text"  th:value="*{mpe1}" name="mpe" id="mpe" />

					</div>
						　 <button type="button" id="but_finish" class="pear-btn-primary pear-btn-sm" onclick="finish()" >&nbsp;检测完成&nbsp;</button>
					</td>
				</tr>



			</table>
			</div>
        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button id="mysubmit"   type="submit" class="layui-btn layui-btn-normal layui-btn-sm disabled"  lay-submit=""
                    lay-filter="scaletab-save" disabled >
                <i class="layui-icon layui-icon-ok"></i>
				提交审核
            </button>

        </div>
    </div>
	<script type="text/html" id="mpe1-type">


		{{#if (d.mpe1 == E2) { }}
		<span class="layui-badge layui-bg-default-blue">E2  ABBA测试2次</span>

		{{#if (d.mpe1 == F1) { }}
		<span class="layui-badge layui-bg-default-blue">F1  ABBA测一次</span>

		{{#if (d.mpe1 == F2) { }}
		<span class="layui-badge layui-bg-default-blue">F2  ABA测一次</span>

		{{#if (d.mpe1 == M1) { }}
		<span class="layui-badge layui-bg-default-blue">M1  ABA测一次</span>
		{{# } }}
	</script>
	<script type="text/html" id="standardWeightCorrected-type">


		{{#if (d.standardWeightCorrected == { "v1":"10", "v2":"10", "v3":"8","v4": "-1"}) { }}
		<span class="layui-badge layui-bg-default-blue">10KG砝码预定参数</span>

		{{#if (d.standardWeightCorrected == { "v1":"10", "v2":"10", "v3":"8","v4": "-1"}) { }}
		<span class="layui-badge layui-bg-default-blue">20KG砝码预设值</span>
		{{# } }}
	</script>
</form>
<th:block th:include="include :: footer"/>
<script th:src="@{/static/scaletab/detection.js}"></script>
<script th:src="@{/static/scaletab/scaletab_abba.js}"></script>
</body>
</html>